package com.lcf.system.feign;

import com.lcf.feign.service.system.SysSaTokenFeignService;
import com.lcf.system.manager.SaTokenManager;
import io.swagger.v3.oas.annotations.Hidden;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 描述：satoken feign实现
 *
 * @author lcf
 * @since 2025/4/16 16:55
 */
@Hidden
@RestController
@RequestMapping("feign/satoken")
public class SysSaTokenFeignServiceImpl implements SysSaTokenFeignService {
    @Resource
    private SaTokenManager satokenManager;

    @Override
    @GetMapping("getPermissionList")
    public List<String> getPermissionList(Object loginId, long tenantId) {
        return satokenManager.getPermissionList(loginId, tenantId);
    }

    @Override
    @GetMapping("getRoleList")
    public List<String> getRoleList(Object loginId, long tenantId) {
        return satokenManager.getPermissionList(loginId, tenantId);
    }
}
